package com.nxy.cpfsfe.busi.bbatproc;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.adtec.starring.datapool.CompSDO;
import com.adtec.starring.datapool.EPOper;
import com.adtec.starring.struct.dta.DtaInfo;
import com.nxy.cpfsfe.enumtype.RespCd;
import com.nxy.cpfsfe.service.CpfsService;

public class BBatProcSrvBean implements CpfsService {
	
	private final static Logger LOGGER = LoggerFactory.getLogger(BBatProcSrvBean.class);

	@Override
	public void doService() {
		LOGGER.info("---------批量结算异步处理开始--------");	

		String tpId = DtaInfo.getInstance().getTpId();
		// 获取输入
		CompSDO inputSdo = (CompSDO) EPOper.getCompSDO(tpId, "ReqBody"); // 获取输入接口
		String bizMsg = (String) inputSdo.getValue("BizMsg")!=null?(String) inputSdo.getValue("BizMsg"):""; // 业务报文	
		LOGGER.debug("业务报文数据bizMsg:[{}]",bizMsg);
		// 获取输出
		CompSDO outputSdo = EPOper.getCompSDO(tpId, "RspBody"); // 获取输出接口
		EPOper.put(tpId, "RspBean[0].head[0].rspsCd", RespCd.NCPI0000);
		EPOper.put(tpId, "RspBean[0].head[0].respsInfoDesc", "交易成功");
		outputSdo.setValue("BizMsg", null);
	}

}
